From: Jonas Dreßler Date: Mon, 8 Feb 2021 17:58:27 +0000 (+0100) Subject: workspace: Properly handle zero spacing in the WorkspaceLayout X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~256 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=51348c6020649e7c98327e4ca139f3565dbb9866;p=gnome-shell.git workspace: Properly handle zero spacing in the WorkspaceLayout It should be allowed to set this._spacing to 0 and thus pass 0 as rowSpacing or colSpacing to this._adjustSpacingAndPadding(). The current if-condition there won't add the oversize to the spacing in case 0 is passed though. So change that if-condition and explicitely check for null instead. Part-of: --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index ba632153b..c7021fe5a 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -463,9 +463,9 @@ var WorkspaceLayout = GObject.registerClass({ const [topOversize, bottomOversize] = window.chromeHeights(); const [leftOversize, rightOversize] = window.chromeWidths(); - if (rowSpacing) + if (rowSpacing !== null) rowSpacing += topOversize + bottomOversize; - if (colSpacing) + if (colSpacing !== null) colSpacing += Math.max(leftOversize, rightOversize); if (containerBox) {